<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>
<body style="background-color: pink">
<div id="showPdf">
    <iframe id="pdfContainer" src="" width="100%" height="800px" frameborder="0"></iframe>
</div>
</body>
<script type="text/javascript">
    $(function () {
        //获取pdf预览地址
        // 这个地址可以是服务器文件存放地址
        var url = "/pdf/c.pdf";
        $("#pdfContainer").attr("src", "/pdfjs/web/viewer.html?file="+url+"#page=1");
    });
</script>
</html>